#include "Drain.h"
// methodes

void Drain::Stop(void)
{
  halOutput->toggle_water_supply(false);
}

void Drain::getCurrentWaterLevel()
{
  halInput->update();
  currentWaterLevel = halInput->readWater();
}
  
void Drain::setWaterLevel(int level)
{
  halOutput->toggle_water_supply(true);
  getCurrentWaterLevel();
  while(level > (currentWaterLevel*33))
  {
    getCurrentWaterLevel();
  }
  
  halOutput->toggle_water_supply(false);
}
